﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework;
using System.IO;
using System.Threading;
using System.Windows.Media.Imaging;
namespace ukulele
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
        
            InitializeComponent();
       
        
        }
        
        String sound1 = "";
        String sound2 = "";
        String sound3 = "";
        String sound4 = "";
        private void check() {
            
            
            if (txtResult.Text == "C" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_6_A#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "C" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "C#" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_5_C.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_7_E.wav";
                sound2 = "sound/2_8_C.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_7_D.wav";
            }
            else if (txtResult.Text == "D" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_6_D#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "D#" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_7_E.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_6_F#.wav";
                sound4 = "sound/4_7_D.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_5_D.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_6_F#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "E" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_6_D#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "F" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "F#" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_5_F.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "G" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "G#" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_0_G.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_4_G#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "A#" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_3_C.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "maj")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "maj7")
            {
                sound1 = "sound/1_1_A#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "m")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "m7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "mM7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_3_A#.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "7")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "dim")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_1_F.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "aug")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_3_G.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "sus2")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_1_C#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "sus4")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "7sus4")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_4_E.wav";
                sound4 = "sound/4_2_A.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "m6")
            {
                sound1 = "sound/1_2_B.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_1_G#.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "m9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_5_A.wav";
                sound3 = "sound/3_2_D.wav";
                sound4 = "sound/4_4_B.wav";
            }
            else if (txtResult.Text == "B" && txtResult2.Text == "add9")
            {
                sound1 = "sound/1_4_C#.wav";
                sound2 = "sound/2_2_F#.wav";
                sound3 = "sound/3_3_D#.wav";
                sound4 = "sound/4_4_B.wav";
            }else
            if (txtResult.Text == "")
            {
                sound1 = "sound/1_0_A.wav";
                sound2 = "sound/2_0_E.wav";
                sound3 = "sound/3_0_C.wav";
                sound4 = "sound/4_0_G.wav";
            }
        }
        private void play_sound()
        {       
            Stream stream = TitleContainer.OpenStream(sound1);
            SoundEffect effect = SoundEffect.FromStream(stream);
            FrameworkDispatcher.Update();
            Stream stream1 = TitleContainer.OpenStream(sound2);
            SoundEffect effect1 = SoundEffect.FromStream(stream1);
            FrameworkDispatcher.Update();
            Stream stream2 = TitleContainer.OpenStream(sound3);
            SoundEffect effect2 = SoundEffect.FromStream(stream2);
            FrameworkDispatcher.Update();
            Stream stream3 = TitleContainer.OpenStream(sound4);
            SoundEffect effect3 = SoundEffect.FromStream(stream3);
            FrameworkDispatcher.Update();
            effect3.Play();
            Thread.Sleep(80);
            effect2.Play();
            Thread.Sleep(85);
            effect1.Play();
            Thread.Sleep(90);
            effect.Play();            
        }
        private void play_Click(object sender, RoutedEventArgs e)
        {
            check();
            play_sound();
        }
        int c = 1;
        private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBoxItem lst = (ListBoxItem)listBox1.SelectedItem;
            txtResult.Text = (String)lst.Content;
            if(c==1){
            maj.IsSelected=true;
            c++;}show();
        }
        private void ListBox2_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (txtResult.Text!="")
            {
                ListBoxItem lst = (ListBoxItem)ListBox2.SelectedItem;
                txtResult2.Text = (String)lst.Content;
                show();
            }
        }
        private void show()
        {
            String tmp = txtResult.Text;
            if (tmp == "C#") { tmp = "Cs"; }else 
                if (tmp == "D#") { tmp = "Ds"; }else
                    if (tmp == "G#") { tmp = "Gs"; }
                    else
                        if (tmp == "F#") { tmp = "Fs"; }
                        else
                            if (tmp == "A#") { tmp = "As"; }
            Uri uri = new Uri("Image/"+tmp+txtResult2.Text+".png", UriKind.Relative);  
            BitmapImage imgSource = new BitmapImage(uri); 
            img.Source= imgSource;
        }
    }
}